/*
 * @Author: Jiraiya
 * @Date: 2020-04-07 19:11:15
 * @LastEditors: Jiraiya
 * @LastEditTime: 2020-04-07 19:33:43
 * @Description: 
 */
import * as React from 'react';
import ReactDOM from 'react-dom';
import Router from './Router/Router';

const list = [
     {
        path: '/',
        name: 'index',
        component: 'This is index page'
      },
      {
        path: '/hash',
        name: 'hash',
        component: 'This is hash page'
      },
      {
        path: '/history',
        name: 'history',
        component: 'This is history page'
      },
      {
        path: '*',
        name: 'notFound',
        component: '404 NOT FOUND'
      }
];

const App = () => {
    const [current, setCurrent] = React.useState('home');
    return <Router list={list} current={current} mode='hash'/>
}

ReactDOM.render(<App />, document.getElementById('app'));